/**
 * Created by kule on 2017/9/7.
 */
import get from 'lodash/get';
import set from 'lodash/set';
export const postHook=(obj,path,fn)=>{
    const _fn=get(obj,path,null);
    set(obj,path,function(...args){
        _fn&&_fn.call(this,...args);
        fn.call(this,...args);
    });
    return obj;
};